//
//  AnimationHelper.h
//  AnimationTest
//
//  Created by minjunxu on 12-4-27.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

enum ANIMATION_OPTION 
{
    ANIMATION_OPACITY_MASK = 0x1,
    ANIMATION_SCALE_MASK = 0x2,
    ANIMATION_ROTATE_MASK_CLOCK = 0x4,
    ANIMATION_ROTATE_MASK_COUNTER = 0x8,
};

@interface AnimationHelper : NSObject

+ (CAAnimation*)animationWithKeyPath:(NSString*)keyPath 
                            duration:(CFTimeInterval)duration
                                form:(id)fromValue
                                  to:(id)toValue
                            delegate:(id)delegate;

+ (void)addAnimationForView:(UIImageView *)view 
       animationWithKeyPath:(NSString*)keyPath 
                   duration:(CFTimeInterval)duration
                       form:(id)fromValue
                         to:(id)toValue
                   delegate:(id)delegate
                        key:(NSString*)key;

+ (void)simpleAnimationForView:(UIImageView *)view 
          animationWithKeyPath:(NSString*)keyPath 
                      duration:(CFTimeInterval)duration
                          form:(id)fromValue
                            to:(id)toValue;


+ (void)addAnimationForView:(UIImageView*)view 
                withOptions:(NSInteger)options
                   duration:(CFTimeInterval)duration
                   delegate:(id)delegate
                        key:(NSString*)key;

+ (void)simpleAnimationForView:(UIImageView*)view 
                   withOptions:(NSInteger)options
                      duration:(CFTimeInterval)duration;

@end
